package cn.edu.hunau.oop.day03;

import org.junit.Test;

/**
 * @author hb
 * @date 2025-08-06 10:40:27
 */
public class UserTest {

    @Test
    public void test01(){
        User u1=new User("1001","张三分");
        //直接输出对象类型变量,默认执行toString方法
        System.out.println(u1);
        //toString从Object父类中继承
        //cn.edu.hunau.oop.day03.User@4c70fda8
        System.out.println(u1.toString());

        User u2=new User("1001","张三分");
        System.out.println(u1.equals(u2));
        System.out.println(u1 == u2);
    }
}
